package com.etoak.controller;


import com.etoak.common.core.vo.ResultVO;
import com.etoak.service.OrderItemService;
import com.etoak.vo.OrderDetailVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author etoak
 * @since 2025-07-31
 */
@RestController
@RequestMapping("/orderItem")
public class OrderItemController {

    @Autowired
    OrderItemService orderItemService;

    @GetMapping("/detail")
    public ResultVO<List<OrderDetailVO>> getDetail(@RequestParam String orderNo) {
        List<OrderDetailVO> odVO = orderItemService.getDetail(orderNo);
        return ResultVO.success(odVO);

    }

}

